#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h> 
#include <stdlib.h> 
#include <string.h> 
#include <math.h> 
#include <ctype.h> 
#include <time.h> 
#include <assert.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int arr[n];
	for (int i = 0; i < n; i++)
	{
		arr[i] = i + 1;
	}

	int left = 0;
	int right = n - 1;
	int check;
	int mid = left + (right - left) / 2;
	
	printf("%d\n", arr[mid]);
	fflush(stdout);
	scanf("%d", &check);
	
	while (check != 0)
	{
		if (check == 1)
		{
			right = mid - 1;
		}

		if (check == -1)
		{
			left = mid + 1;
		}

		mid = left + (right - left) / 2;
		printf("%d\n", arr[mid]);
		fflush(stdout);
		scanf("%d", &check);
	}

	return 0;
}